﻿<!DOCTYPE html>
<html>
<head>
    <title>{$platform.name}</title>
    <link href="/static/css/framework-font.css" rel="stylesheet"/>
    <script src="/static/js/jquery-2.1.1.js"></script>
    <script src="/static/bootstrap/js/bootstrap.js"></script>
    <link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>

    <script src="/static/js/jquery.cookie.js"></script>
    <link href="/static/css/framework-theme.css" rel="stylesheet"/>
    <script src="/static/js/framework-ui.js"></script>
    <script src="/static/js/framework-clientdata.js"></script>

    <!--弹框js-->
    <script src="/static/js/yii.js"></script>

    <!--引用layui弹框插件-->
    <script src="/static/layui/layui.all.js"></script>
    <script src="/static/layui/layui.js"></script>
    <link href="/static/layui/css/layui.css" rel="stylesheet"/>
    <script src="/static/layui/lay/modules/layer.js"></script>



    <!--开关主键-->
    <script src="/static/bootstrap/bootstrap-switch.js"></script>
    <link href="/static/bootstrap/bootstrap-switch.css" rel="stylesheet"/>

<!--    配置select多选相关-->
    <script src="/static/layui/dist/xm-select.js"></script>


        {if condition="$swidthStyle eq 0"}
    <link href="/static/css/pattern/public.css" rel="stylesheet"/>
    {else/}
        {if condition="$swidthStyle eq 0"}
    <link href="/static/css/pattern/public.css" rel="stylesheet"/>
    {else/}
    <link href="/static/css/default/public.css" rel="stylesheet"/>
    {/if}
    {/if}
</head>
<body>

<div class="newtest">

    <div class="container new_serach">
        {volist name="powerList" id="vo"}
        <a class="btn btn-primary btn-sm" href="{$vo['url']}">{$vo.name}</a>
        {/volist}
    </div>

    <div class="container new_serach">
        <span> 关键字：</span>
        <div class="layui-inline">
            <input class="form-control serach_key" name="keyword" value="{$keyword}" type="text">
        </div>
        <button class="layui-btn layui-btn-sm" data-type="reload">搜索</button>
    </div>

    <div class="new_main">
        <table class="layui-hide" id="demo" lay-filter="demo"></table>
    </div>
</div>




</body>
<script src="/static/js/index.js"></script>
<script src="/static/js/indextab.js"></script>
<script src="/static/js/pace.min.js"></script>
<script>
    layui.use(['form','jquery','layer','laydate','table'], function() { //独立版的layer无需执行这一句
        var $ = layui.jquery, layer = layui.layer;
        var form = layui.form;
        var laydate = layui.laydate;
        var table = layui.table //表格
        //日期范围
        laydate.render({
            elem: '#test6'
            , range: true
        });

        //搜索操作
        $('.layui-btn').click(function () {
            var keyword = $('input[name="keyword"]').val();
            table.reload('demo', {
                url:"{:URL('admin/citizens/log')}"
                , request: {
                    pageName: 'page' //页码的参数名称，默认：page
                    , limitName: 'pageSize' //每页数据量的参数名，默认：limit
                }
                , where: {
                    keyword: keyword,
                }
                , page: {
                    curr: 1
                }
            });
        });

        table.render({
            toolbar: '#toolbarDemo', //开启头部工具栏，并为其绑定左侧模板
            defaultToolbar: ['filter', 'exports', 'print'],
            elem: '#demo', // 表格id
            url:"{:URL('admin/citizens/log')}",
            where:{type:'list'},
            title: '单元列表',
            page: true, // 树形表格一般是没有分页的
            cols: [[
                {field: 'realName', title: '真实姓名',width:120,align:'center'}
                ,{field: 'nickname', title: '用户昵称',width:120,align:'center'}
                ,{field: 'type', title: '类型',width:120,align:'center'}
                ,{field: 'remark', title: '备注',align:'center'}
                ,{field: 'status', title: '操作',align:'center'}
                ,{field: 'number', title: '操作金额',align:'center'}
                ,{field: 'before_number', title: '操作前余额',align:'center'}
                ,{field: 'after_number', title: '操作后余额',align:'center'}
                ,{field: 'addtime', title: '操作时间',sort: true,width:180,align:'center'}
            ]],
            done: function() {
                layer.closeAll('loading');
            }
        });


    });


</script>

</html>
